/*
 * @Description: 新表单相关接口
 * @Autor: lizhengkun
 * @Date: 2021-10-19 16:29:44
 */
import { extend } from '@/services/request';
import { ACE_FORM } from './constant';

const request = extend({
  prefix: ACE_FORM
});

interface ListParam {
  pageNum: number;
  pageSize: number;
}
/**
 * @description: 表单列表
 * @param {*}
 */
export async function getFromList(param: ListParam) {
  return request('/form/page', {
    method: 'POST',
    contentType: 'application/json',
    data: param
  });
}

/**
 * @description: 获取表单详情
 * @param {*}
 */
export async function getFromDetail(id: string) {
  return request(`/form/detail/${id}`, {
    method: 'GET',
    contentType: 'application/json',
    params: { id }
  });
}
